#ifndef MESH_TRAITS_H_
#define MESH_TRAITS_H_

template <typename Vertex> struct VertexTraits 
{
	typedef typename Vertex::ValueType    ValueType; 
	typedef typename Vertex::FaceType     FaceType;
	typedef typename Vertex::VertexType   VertexType;
	typedef typename Vertex::HalfEdgeType HalfEdgeType ; 
	typedef typename Vertex::EdgeType     EdgeType ; 
	typedef typename Vertex::VectorType   VectorType ;
	typedef typename Vertex::PointType    PointType ;
};

template <typename Face> struct FaceTraits 
{
	typedef typename Face::ValueType    ValueType; 
	typedef typename Face::FaceType     FaceType;
	typedef typename Face::VertexType   VertexType;
	typedef typename Face::HalfEdgeType HalfEdgeType ; 
	typedef typename Face::EdgeType     EdgeType ; 
	typedef typename Face::VectorType   VectorType ;
	typedef typename Face::PointType    PointType ;
};

template <typename HalfEdge> struct HalfEdgeTraits 
{
	typedef typename HalfEdge::ValueType    ValueType; 
	typedef typename HalfEdge::FaceType     FaceType;
	typedef typename HalfEdge::VertexType   VertexType;
	typedef typename HalfEdge::HalfEdgeType HalfEdgeType ; 
	typedef typename HalfEdge::EdgeType     EdgeType ; 
	typedef typename HalfEdge::VectorType   VectorType ;
	typedef typename HalfEdge::PointType    PointType ;
};

template <typename Edge> struct EdgeTraits 
{
	typedef typename Edge::ValueType    ValueType; 
	typedef typename Edge::FaceType     FaceType;
	typedef typename Edge::VertexType   VertexType;
	typedef typename Edge::HalfEdgeType HalfEdgeType ; 
	typedef typename Edge::EdgeType     EdgeType ; 
	typedef typename Edge::VectorType   VectorType ;
	typedef typename Edge::PointType    PointType ;
};

template <typename Value> class HalfEdge ;
template <typename Value> class Edge;
template <typename Value> class Face;
template <typename Value> class Vertex; 
template <typename MeshTraits> class Mesh;


template <typename Value>
struct MeshTraits
{
	typedef Value            ValueType ; 
	typedef Face <Value>     FaceType ;
	typedef Vertex <Value>   VertexType  ;
	typedef HalfEdge <Value> HalfEdgeType ; 
	typedef Edge <Value>     EdgeType ;
	typedef Vector<Value>    VectorType ;
	typedef VectorType       PointType ;

	typedef VertexTraits<VertexType>     VertexTraitsType; 
	typedef FaceTraits  <FaceType>       FaceTraitsType; 
	typedef EdgeTraits  <EdgeType>       EdgeTraitsType; 
	typedef HalfEdgeTraits<HalfEdgeType> HalfEdgeTraitsType; 
};


#endif
